﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PublicDatumQuery.aspx.cs" Inherits="CentralOffice.WebClient.Archives.PublicDatumQuery" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
    <link rel="stylesheet" type="text/css" href="../theme/2/style.css" />
    <script type="text/javascript" src="../inc/js/ccorrect_btn.js"></script>
</head>
<body  class="bodycolor" topmargin="5">
<div style="margin-top:10px;"><img src="../images/sys_config.gif" WIDTH="22" HEIGHT="20" align="absmiddle" /><span class="big3">档案查询</span></div>
     <form id="form1" runat="server"><ajaxToolkit:ToolkitScriptManager runat="server" ID="sm"  />
    <script type="text/javascript" src="../inc/js/ProvinceCity.js"></script>
    
    <table class="TableBlock" width="100%" align="center">
<tr>
    <td class="TableData">资料名称：</td><td class="TableData" ><asp:TextBox ID="txtName" runat="server" CssClass="BigInput" ></asp:TextBox></td>
    <td class="TableData">资料类型：</td><td class="TableData" ><asp:DropDownList ID="ddlCategory" runat="server"></asp:DropDownList></td>
</tr>
<tr>
   <td nowrap class="TableControl" colspan="3" align="center"><asp:Button ID="btnQuery" runat="server" Text="查询"   CssClass="BigButton" OnClick="btnQuery_Click" /></td>
   <td nowrap class="TableControl" colspan="3" align="center"><input type="button" value="添加" class="BigButton" onclick="window.location='PublicDatumAdd.aspx?operation=add';"><%--<input type="submit" value="复制" class="BigButton" style="margin-left:20px;">--%></td>
</tr>
</table>

<div style="margin-top:20px; margin-left:8px;"><h3>查询结果：</h3></div>
<div style="text-align:center">
<asp:UpdatePanel UpdateMode="Conditional" ID="upArchive" runat="server" ChildrenAsTriggers="true">
<ContentTemplate>
<huag:OAGridView  id="gv" runat="server" DataKeyNames="Id" AllowSorting="True" skinid="PagingGridView" Width="100%"  DataSourceID="odsPublicDatum" EnableViewState="false" ConfirmDelete="true" OnRowDataBound="gv_RowDataBound" ><%--OnDataExport="gv_DataExport"--%>
   <Columns>
        <asp:BoundField DataField="Name" HeaderText="资料名称" SortExpression="Name" />
        <huag:EnumTypeField DataField="Category" HeaderText="资料类型" CategoryName="archiveType" />
        <asp:BoundField DataField="Remark" HeaderText="描述" SortExpression="Remark" />
        <asp:BoundField DataField="UploadDate" HeaderText="上传日期" SortExpression="UploadDate" />
        <asp:HyperLinkField DataTextField="Attachments" HeaderText="附件"  />

        <asp:HyperLinkField  DataNavigateUrlFormatString="PublicDatumUpdate.aspx?id={0}&operation=edit" DataNavigateUrlFields="Id" Text="编辑" />
        <asp:CommandField ShowDeleteButton="True" DeleteText="删除" />
   </Columns>
</huag:OAGridView>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnQuery" />
</Triggers>
</asp:UpdatePanel>

<%--MaximumRowsParameterName="maxRows" StartRowIndexParameterName="startIndex"<asp:Parameter Name="startIndex" Type="Int32" /><asp:Parameter Name="maxRows" Type="Int32" /> <asp:Parameter Name="sortExpression" Type="String"/> --%>
<asp:ObjectDataSource id="odsPublicDatum" runat="server" EnablePaging="True" 
 TypeName="CentralOffice.Archive.BusinessActions.PublicDatum" 
 SelectMethod="GetPaged" SelectCountMethod="GetCount"
 DeleteMethod="DeleteById"
 SortParameterName="sortExpression">
    <SelectParameters>
      <asp:Parameter Name="whereClause" Type="String" />
    </SelectParameters>
</asp:ObjectDataSource>
</div>
    </form>
</body>
</html>
